{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 总共48只鸡鸭"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-09-22T11:57:41.518247Z",
     "start_time": "2020-09-22T11:57:41.513275Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(48,)\n",
      "[ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\n",
      " 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "np1 = np.arange(1, 49)\n",
    "print(np1.shape)\n",
    "print(np1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 分为鸡鸭两类"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-09-22T11:58:12.237951Z",
     "start_time": "2020-09-22T11:58:12.232965Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(2, 24)\n",
      "[[ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24]\n",
      " [25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48]]\n"
     ]
    }
   ],
   "source": [
    "np2 = np1.reshape((-1, 24))\n",
    "print(np2.shape)\n",
    "print(np2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 每类分为三种品质"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-09-22T11:59:15.654109Z",
     "start_time": "2020-09-22T11:59:15.649090Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(2, 3, 8)\n",
      "[[[ 1  2  3  4  5  6  7  8]\n",
      "  [ 9 10 11 12 13 14 15 16]\n",
      "  [17 18 19 20 21 22 23 24]]\n",
      "\n",
      " [[25 26 27 28 29 30 31 32]\n",
      "  [33 34 35 36 37 38 39 40]\n",
      "  [41 42 43 44 45 46 47 48]]]\n"
     ]
    }
   ],
   "source": [
    "np3 = np2.reshape((2,3,8))\n",
    "print(np3.shape)\n",
    "print(np3)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
